<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<html>
<head>
	<meta charset="UTF-8">
	<title>Wines - Paredes Winery Website Template</title>
	<link rel="stylesheet" href="css/style.css" type="text/css">
</head>
<body>
	<a href="index.html" class="logo"><img src="images/logo.jpg" alt=""></a>
	<ul>
		<li>
			<span><a href="index.html">home</a></span>
		</li>
	</ul>
</body>
<?php
require_once 'Lib/main.php';
$a = new Dao_CategoryDAO();
$res = $a->getCategory(); //echo $res[0];
$res = $res[0];
var_dump($res);
var_dump($res->getName());
?>

<?php 
require_once 'Lib/main.php';

$categoryParam =  isset($_REQUEST['cat']) ? $_REQUEST['cat'] : '' ;
$productClassParam =  isset($_REQUEST['class']) ? $_REQUEST['class'] : '' ;

$categoryDao = new Dao_CategoryDAO();
$category = $categoryDao->getCategory();

$idCat = $categoryParam;
$idClass = $productClassParam;
$page = 0;
$num = 20;
$productDao = new Dao_ProductDAO();
$product = $productDao->getListProductsByClassAndCat($idCat, $idClass, $page, $num);
var_dump($product);


?>
